package o;

import androidx.annotation.NonNull;
import com.huawei.hms.aaid.constant.AaidIdConstant;
import java.security.MessageDigest;
import o.aat.a;
import o.aat.d;

public class uw {
    private final aar<sa, String> ˊ = new aar(1000);
    private final o.hg.e<e> ˏ = aat.ॱ(10, new a<e>(this) {
        final /* synthetic */ uw ˊ;

        {
            this.ˊ = r1;
        }

        public /* synthetic */ Object ॱ() {
            return ˎ();
        }

        public e ˎ() {
            try {
                return new e(MessageDigest.getInstance(AaidIdConstant.SIGNATURE_SHA256));
            } catch (Throwable e) {
                throw new RuntimeException(e);
            }
        }
    });

    static final class e implements d {
        final MessageDigest ˊ;
        private final abb ˏ = abb.ˊ();

        e(MessageDigest messageDigest) {
            this.ˊ = messageDigest;
        }

        @NonNull
        public abb ˏ() {
            return this.ˏ;
        }
    }

    public String ॱ(sa saVar) {
        String str;
        synchronized (this.ˊ) {
            str = (String) this.ˊ.ˏ(saVar);
        }
        if (str == null) {
            str = ˋ(saVar);
        }
        synchronized (this.ˊ) {
            this.ˊ.ˊ(saVar, str);
        }
        return str;
    }

    private String ˋ(sa saVar) {
        e eVar = (e) aas.ˎ(this.ˏ.ˎ());
        try {
            saVar.ॱ(eVar.ˊ);
            String ˏ = aau.ˏ(eVar.ˊ.digest());
            return ˏ;
        } finally {
            this.ˏ.ˋ(eVar);
        }
    }
}
